package cn.xiu.drugstore.dao;

import java.util.List;

import cn.xiu.drugstore.pojo.Drug;

/**
 * 药品功能接口
 * @author 贾
 *
 */
public interface DrugDao {
	/**
	 * 添加药品
	 * @param drug
	 * @return
	 * @throws Exception
	 */
	public int addDrug(Drug drug) throws Exception;
	/**
	 * 查询所有药品
	 * @return
	 * @throws Exception
	 */
	public List<Drug> findAllDrug() throws Exception;
	/**
	 * 根据药品名查询药品
	 * @param drugName
	 * @return
	 * @throws Exception
	 */
	public Drug queryByDrugName(String drugName) throws Exception;
	/**
	 * 根据药品id查询药品
	 * @param drugId
	 * @return
	 * @throws Exception
	 */
	public Drug queryByDrugId(String drugId) throws Exception;
	/**
	 * 根据药品名修改药品价格
	 * @param drugPrice
	 * @param drugId
	 * @return
	 * @throws Exception
	 */
	public int updateDrug(Double drugPrice,Integer drugId) throws Exception;
	/**
	 * 根据id修改药品价格
	 * @param drugCount
	 * @param drugId
	 * @return
	 * @throws Exception
	 */
	public int updateDrug(Integer drugCount,Integer drugId) throws Exception;
	/**
	 * 根据id删除药品
	 * @param drugId
	 * @return
	 * @throws Exception
	 */
	public int deleteDrug(String drugId) throws Exception;
}
